/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * job api
 * API COMPILE CODE TO PACKAGE
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using System;
using System.Collections.Generic;
using System.Text;

using JDCloudSDK.Core.Annotation;

namespace JDCloudSDK.Compile.Model
{

    /// <summary>
    ///  jobRequest
    /// </summary>
    public class JobRequest
    {

        ///<summary>
        /// 项目名称
        ///Required:true
        ///</summary>
        [Required]
        public string Name{ get; set; }
        ///<summary>
        /// 源提供商，代码存储类型代码存储类型， 目前只支持github
        ///Required:true
        ///</summary>
        [Required]
        public string CodeType{ get; set; }
        ///<summary>
        /// 仓库地址，代码clone路径
        ///Required:true
        ///</summary>
        [Required]
        public string CodeRepoUrl{ get; set; }
        ///<summary>
        /// 代码分支
        ///Required:true
        ///</summary>
        [Required]
        public string CodeRepoBranch{ get; set; }
        ///<summary>
        /// 获取用户OSS库用，用户云存储路径用户云存储路径，如果为空，使用公用的云存储
        ///</summary>
        public string OssPath{ get; set; }
        ///<summary>
        /// 上传区域，用户云存储主机，实际为用户云存储所在地域
        ///Required:true
        ///</summary>
        [Required]
        public string OssHost{ get; set; }
        ///<summary>
        /// 获取用户OSS库用，用户云存储bucket，如果为空，使用公用的云存储
        ///</summary>
        public string OssBucket{ get; set; }
        ///<summary>
        /// 选择类型 和 运行版本 共同拼出此项，编译镜像地址
        ///Required:true
        ///</summary>
        [Required]
        public string BuildImage{ get; set; }
        ///<summary>
        /// 构建规范，选择在源代码供目录中使用build.yml则为false，选择插入构建命令则为true，这项为true，则buildSetConfig需要有内容，如果这项为false，即使buildSetConfig有内容，也不生效
        ///</summary>
        public bool IsUserBuildSetConfig{ get; set; }
        ///<summary>
        /// 插入构建命令，isUserBuildSetConfig选择true时，这项让用户填写内容，内容从接口/regions/{regionId}/jobs/default/buildSet 获取
        ///</summary>
        public string BuildSetConfig{ get; set; }
        ///<summary>
        /// 超时时间，单位秒
        ///</summary>
        public int? BuildTimeOut{ get; set; }
        ///<summary>
        /// 计算类型中 cpu分配核数
        ///</summary>
        public int? BuildResourceCpu{ get; set; }
        ///<summary>
        /// 计算类型中 内存分配大小，单位MB
        ///</summary>
        public int? BuildResourceMem{ get; set; }
        ///<summary>
        /// 通知邮件
        ///</summary>
        public string NoticeMail{ get; set; }
        ///<summary>
        /// 通知频率， MAIL_FAILED失败时通知，MAIL_EVERY每次构建就通知
        ///</summary>
        public string NoticeType{ get; set; }
        ///<summary>
        /// 构建类型
        ///</summary>
        public string CompilerType{ get; set; }
        ///<summary>
        /// 镜像注册表名
        ///</summary>
        public string DockerRegistry{ get; set; }
        ///<summary>
        /// 镜像仓库名
        ///</summary>
        public string DockerRepository{ get; set; }
        ///<summary>
        /// 注册表的URI
        ///</summary>
        public string DockerRegistryUri{ get; set; }
    }
}
